package com.ruoyi.etp.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 导出记录管理对象 etp_file_management
 *
 * @author xmj
 * @date 2025-09-09
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EtpFileManagement extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** ID */
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 文件类型 */
    @Excel(name = "文件类型")
    private String fileType;
    /** 文件名称 */
    @Excel(name = "文件名称")
    private String fileName;
    /** 状态 */
    @Excel(name = "状态")
    private String fileStatus;
    /** 失败原因 */
    @Excel(name = "失败原因")
    private String failureReason;
    /** 文件存储路径 */
    @Excel(name = "文件存储路径")
    private String filePath;
    /** 文件大小(字节) */
    @Excel(name = "文件大小(字节)")
    private Long fileSize;
    /** 下载次数 */
    @Excel(name = "下载次数")
    private Long downloadCount;
    /** 最近下载时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最近下载时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastDownloadTime;
    /** 创建人 */
    @Excel(name = "创建人")
    private String createdBy;
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("fileType", getFileType())
            .append("fileName", getFileName())
            .append("fileStatus", getFileStatus())
            .append("failureReason", getFailureReason())
            .append("filePath", getFilePath())
            .append("fileSize", getFileSize())
            .append("downloadCount", getDownloadCount())
            .append("lastDownloadTime", getLastDownloadTime())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
        .toString();
    }
}
